package com.financing.wap.dao.impl;


import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Repository;
import com.financing.wap.dto.ShopperUserInfoDTO;
import com.financing.wap.dao.IShopperUserInfoDao;
import com.financing.wap.common.SqlName;
/**
 * shopper_user_info  
 * 店铺基本资料 数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("shopperUserInfoDao")
public class ShopperUserInfoDaoImpl extends BaseDaoImpl<ShopperUserInfoDTO, java.lang.Integer> implements IShopperUserInfoDao {


	@Override
	public int insert(ShopperUserInfoDTO shopperUserInfo) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.insert(SqlName.ShopperUserInfoSql.insert, shopperUserInfo);
	}

	@Override
	public void update(ShopperUserInfoDTO shopperUserInfo) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.ShopperUserInfoSql.update, shopperUserInfo);
	}

	@Override
	public void updateForce(ShopperUserInfoDTO shopperUserInfo) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.ShopperUserInfoSql.updateForce, shopperUserInfo);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClientTemplate.delete(SqlName.ShopperUserInfoSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<ShopperUserInfoDTO> queryList(ShopperUserInfoDTO shopperUserInfo) throws SQLException {
		return this.sqlMapClientTemplate.queryForList(SqlName.ShopperUserInfoSql.queryList, shopperUserInfo);
	}

	@Override
	public int queryListCount(ShopperUserInfoDTO shopperUserInfo) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.queryForObject(SqlName.ShopperUserInfoSql.queryListCount, shopperUserInfo);
	}

	@Override
	public ShopperUserInfoDTO loadById(Integer id) throws SQLException {
		return  (ShopperUserInfoDTO)this.getSqlMapClientTemplate().queryForObject(SqlName.ShopperUserInfoSql.loadById,id);
	}

	@Override
	public Class<ShopperUserInfoDTO> getEntityClass() {
		return ShopperUserInfoDTO.class;
	}
 	
}
